1. Technical Field
The present invention relates in general to data processing systems and in particular to flash memory within data processing systems. Still more particularly, the present invention relates to a system, method and computer program product for recovery of formatting in repair of bad sectors in flash memory of a data processing system.
2. Description of the Related Art
Many microprocessor-based devices and systems use so-called “flash memory” devices, which employ a particular form of EEPROM (Electronically Erasable Programmable Read-Only Memory) to store data. Such devices can include, for example, computers, mobile telephones, electronic toys, cameras, and domestic appliances such as washing machines. Indeed, almost every microprocessor-based product in production today employs flash memory.
Flash memory maintains stored information without requiring a power source. Flash memory differs from typical EEPROM in that EEPROM erases its content one byte at a time, making a typical EEPROM slow to update. Flash memory can erase its data in entire blocks, making flash memory a preferable technology for applications that require frequent updating of large amounts of data, as in the case of a memory stick.
Inside a flash memory chip, information is stored in cells. A floating gate protects the data written in each cell. Tunneling electrons pass through a low conductive material to change the electronic charge of the gate in “a flash,” clearing the cell of its contents so that it can be rewritten. This “flash” for clearing cell contents is the basis of the ‘flash memory’ name.
Unfortunately, one of the largest contributors to the probability of failure for a device incorporating a flash memory is the flash memory itself. As flash memory components are usually soldered to other components such as a main circuit board, a flash memory failure will often result in the need to replace not only the flash memory, but other components as well. The degree to which flash memory has become deeply integrated into devices has caused device designers to create methods for correcting errors in flash memory, most of which depend on manual intervention by a user or on redundant storage of data.
In data processing systems, the formatting for data stored in a flash memory can become corrupted or damaged for a variety of reasons, for example, loss of power during a write or a format operation. As with the error correction methods for other problems in flash memory, prior art methods for recovering from corruption of this formatting data involve the constant maintenance of redundant copies of the data or require that the user corrects the corruption of the formatting through replacement or manual repair.
The state of prior art methods results in several drawbacks. First, maintaining redundant copies of formatting data is not desirable, because such maintenance increases storage requirements. This concern about storage requirements becomes particularly important in embedded systems or other systems in which storage resources are limited. Similarly, prior art methods that require the user to correct the corruption of the formatting through replacement or manual repair involve time costs to the user or information technology personnel. The reduction of such costs is desired.